{{ define "main" }}

{{ $data := index .Site.Data .Site.Language.Lang }}

{{ partial "page-title.html" . }}
{{ "<!-- contact items -->" | safeHTML }}
<section class="section pb-0">
  <div class="container">
    <div class="row">
      <div class="col-lg-12">
        <div class="content">
          {{ .Content }}
        </div>
      </div>
    </div>
  </div>
</section>
{{ if .Site.Params.contact_list }}
<section class="section pb-0">
  <div class="container">
    <div class="row">
      {{ "<!-- Addresses -->" | safeHTML }}
      <div class="col-md-4 mb-4 mb-md-0">
        <div class="bg-white box-shadow text-center p-5 px-md-2 px-lg-5">
          <i class="fa fa-map-marker text-primary icon-lg mb-4"></i>
          <h4 class="mb-4">{{ i18n "address" }}</h4>
          <p>{{ .Site.Params.address | markdownify }}</p>
        </div>
      </div>
      <div class="col-md-4 mb-4 mb-md-0">
        <div class="bg-white box-shadow text-center p-5 px-md-2 px-lg-5">
          <i class="fa fa-wechat text-primary icon-lg mb-4"></i>
          <h4 class="mb-4">{{ i18n "wechat" }}</h4>
          <p>{{ .Site.Params.wechat | markdownify }}</p>
        </div>
      </div>
      <div class="col-md-4 mb-4 mb-md-0">
        <div class="bg-white box-shadow text-center p-5 px-md-2 px-lg-5">
          <i class="fa fa-envelope text-primary icon-lg mb-4"></i>
          <h4 class="mb-4">{{ i18n "email" }}</h4>
          <p>{{ .Site.Params.email | markdownify }}</p>
        </div>
      </div>
    </div>
  </div>
</section>
{{ end }}
{{ "<!-- /contact item -->" | safeHTML }}

{{ if .Site.Params.map }}
{{ "<!-- contact form and map -->" | safeHTML }}
<section class="section">
  <div class="container">
    <div class="row">
      {{ "<!-- google map -->" | safeHTML }}
      <div class="col-md-5 mb-5 mb-md-0">
        <div id="map_canvas" data-latitude="{{ .Site.Params.map.map_latitude }}"
          data-longitude="{{ .Site.Params.map.map_longitude }}"
          data-marker="{{ .Site.Params.map.map_marker | relURL }}"
          data-marker-name="{{ .Site.Title }}">
        </div>
      </div>
      {{ if .Site.Params.quick_contact }}
      <div class="col-md-7">
        <h3 class="section-title">{{ i18n "contact_form" }}</h3>
        <form action="{{ .Site.Params.contact_form_action }}" method="POST" class="row">
          <div class="col-md-6">
            <input type="text" name="name" id="name" class="form-control border-0 rounded-0 box-shadow mb-4"
              placeholder="Name">
          </div>
          <div class="col-md-6">
            <input type="email" name="mail" id="mail" class="form-control border-0 rounded-0 box-shadow mb-4"
              placeholder="Email">
          </div>
          <div class="col-md-6">
            <input type="text" name="phone" id="phone" class="form-control border-0 rounded-0 box-shadow mb-4"
              placeholder="Phone">
          </div>
          <div class="col-md-6">
            <input type="text" name="subject" id="subject" class="form-control border-0 rounded-0 box-shadow mb-4"
              placeholder="Subject">
          </div>
          <div class="col-12">
            <textarea name="message" id="message" class="form-control border-0 rounded-0 box-shadow mb-5 py-3 px-4"
              placeholder="Your Message"></textarea>
          </div>
          <div class="col-12">
            <button type="submit" value="send" class="btn btn-primary hover-ripple">{{ i18n "send" }}</button>
          </div>
        </form>
      </div>
      {{ end }}
    </div>
  </div>
</section>
{{ "<!-- /contact form and map -->" | safeHTML }}

{{ end }}
{{ end }}
